package io.renren.modules.erp.controller;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import io.renren.common.utils.PageUtils;
import io.renren.common.utils.R;
import io.renren.common.validator.ValidatorUtils;
import io.renren.modules.erp.dao.NewsInfoDao;
import io.renren.modules.erp.entity.BaseParamEntity;
import io.renren.modules.erp.entity.NewsInfoEntity;
import io.renren.modules.erp.service.BaseParamService;
import io.renren.modules.oss.controller.SysOssController;



/**
 * 
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2018-07-19 22:30:09
 */
@RestController
@RequestMapping("wxapp/newsinfo")
public class NewsInfoController {
    @Autowired
    private NewsInfoDao newsInfoDao;

    /**
     * 列表
     */
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params){
    	List<NewsInfoEntity> res = newsInfoDao.selectNews();

    	for(NewsInfoEntity entity:res){
    		System.out.println(entity.getContent());
    	}
        return R.ok().put("code", 0).put("result", res);
    }



}
